<?php
class Place_HomeController extends Clu_Controller_Action_Hvn
{
	public function init()
	{
		//require_once  (APP_PATH.'/modules/article/Model/Article.php');
		//require_once  (APP_PATH.'/modules/category/Model/Category.php');
		//require_once  (APP_PATH.'/modules/comment/Model/Comment.php');
		//require_once  (APP_PATH.'/modules/user/Model/User.php');
		$this->m = new place_Model_Place();
		$this->mCity = new place_Model_City();
		$this->mDistrict = new place_Model_District();
		$this->mVillage = new place_Model_Village();
		$this->mArticle = new article_Model_Service();
		$this->mCategory = new category_Model_Category();
		$this->mCategory->setTables('place');
		$this->mComment = new comment_Model_Service();
		$this->mVicinity = new place_Model_Vicinity();
		parent::init();
	}
	
	public function indexAction()
	{
		$sess = new Zend_Session_Namespace(CLU_NS);
//		$places = $this->_request->getParams();
		$simpleSearchRequest = array(
                                'module' => 'place',
                                'controller' => 'block',
                                'action' => 'simpleSearch',
                                'regionId' => 4,
                                'boxWeight' => 1,
								'page' => 'home'
                );
		$this->addMiniAction($simpleSearchRequest);
				
		$topCityRequest = array(
				'module' => 'place',
				'controller' => 'block',
				'action' => 'topCityMarquee',
				'regionId' => 4,
				'boxWeight' => 0,
		);
		$this->addMiniAction($topCityRequest);
		$placeRequest = array(
                                'module' => 'place',
                                'controller' => 'block',
                                'action' => 'featuredList',
                                'regionId' => 4,
                                'boxWeight' => 2,
								'page' => 'home'
                );
		$this->addMiniAction($placeRequest);
		
		/*
		$topInCityRequest = array(
				'module' => 'place',
				'controller' => 'block',
				'action' => 'topInCity',
				'regionId' => 4,
				'boxWeight' => 5,
				'city_id' =>  $places['city_id'],
				'type1'  => 45, //top retaurant
				'type2'  => 54 //top cinema
		);
		$this->addMiniAction($topInCityRequest);
         */
		$placeBrowseByCategoriesRequest = array(
				'module' => 'place',
				'controller' => 'block',
				'action' => 'browseByCategory',
				'regionId' => 5,
				'boxWeight' => 0,
		);
		$this->addMiniAction($placeBrowseByCategoriesRequest);
		
		 $mapRequest = array(
                                'module' => 'common',
                                'controller' => 'block',
                                'action' => 'mapVietnam',
                                'regionId' => 5,
                                'boxWeight' => 1,
                );
		$this->addMiniAction($mapRequest);
		
		
	}
}
?>